package com.hhdys.model;

import java.util.Map;

import com.hhdys.util.Constant;

public class WebSet {
    private Integer id;

    private int parentKey;
    
    private String key;

    private String value;

    private String descript;
    
    private String showParentSet;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key == null ? null : key.trim();
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value == null ? null : value.trim();
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript == null ? null : descript.trim();
    }

	/**
	 * @return the parentKey
	 */
	public int getParentKey() {
		return parentKey;
	}

	/**
	 * @param parentKey the parentKey to set
	 */
	public void setParentKey(int parentKey) {
		this.parentKey = parentKey;
	}

	/**
	 * @return the showParentSet
	 */
	public String getShowParentSet() {
		if(this.parentKey==0){
			return "无";
		}
		for(Map.Entry<String, Map<String, WebSet>> map: Constant.WEBSET.entrySet()){
			WebSet set=map.getValue().get(map.getKey());
			if(set.getParentKey()==0){
				if(set.getId()==this.parentKey){
					return set.getKey();
				}
			}
		}
		return "无";
	}

	/**
	 * @param showParentSet the showParentSet to set
	 */
	public void setShowParentSet(String showParentSet) {
		this.showParentSet = showParentSet;
	}

}